package test2;

public class demo80 {
    //删除倒数第n个节点
/*    class Solution {
        public ListNode removeNthFromEnd(ListNode head, int n) {
            ListNode cur = new ListNode(0);
            ListNode f = cur;
            ListNode s = cur;
            cur.next = head;

            //快指针先走n步
            while(n>0)
            {
                f = f.next;
                n--;
            }

            //快慢指针一起走
            while(f.next !=null)
            {
                f=f.next;
                s=s.next;
            }

            s.next = s.next.next;
            return cur.next;
        }
    }*/
}
